package com.plant.user.enumm;

public enum ErrorCode {
    PHONE_CANNOT_BE_EMPTY(1001, "手机号不可为空"),
    PASSWORD_CANNOT_BE_EMPTY(1002, "密码不可为空"),
    PASSWORD_CONTAINS_CHINESE(1003, "密码不可包含汉字"),
    PASSWORD_LENGTH_INVALID(1004, "密码长度必须在 8 - 32 之间"),
    PASSWORD_NOT_MATCH(1005, "两次密码不一致"),
    USER_ADD_FAILED(1006, "添加失败"),
    SUCCTRESS(2000, "修改成功"),
    USERNAME_GENERATION_FAILED(1007, "修改失败");

    private final int code;
    private final String message;

    ErrorCode(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }

}